home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-21 | 2.2 KB | 77 lines | [TEXT/ttxt] |
- --<<<
- -- Filename:
- -- autogrph.sx
-
- -- Other Files Required:
- -- grapher.sx, grphclab.sx, grphmenu.sx, modelcar.sx
-
- -- Purpose:
- -- Sets up a Grapher oriented for automobile selection
-
- -- Specialized Classes:
- -- None
-
- -- Instructions to User:
- -- None
-
- -- Author:
- -- Dionn Stewart, Steve Mayer, Ray Davis
- in module Autofinder
-
- if (not isDefined Grapher) do fileIn theScriptDir name:"grapher.sx"
- if (not isDefined Axis) do fileIn theScriptDir name:"axis.sx"
- if (not isDefined GraphicLabel) do fileIn theScriptDir name:"grphclab.sx"
- if (not isDefined GrapherMenu) do fileIn theScriptDir name:"grphmenu.sx"
- if (not isDefined ModelCar) do fileIn theScriptDir name:"modelcar.sx"
-
- class AutoGrapher (Grapher)
- instance variables
- dropspace -- area to drop modelcars in to add to queryList
- -- queryList -- List of car names to query database with
- -- blackCurtain -- blackCurtain screen for introduction
- end
-
- method init self {class AutoGrapher} #rest args #key media: ->
- (
- local labelFont, labelFontChanges
- local xAxis, YAxis, propMenu, background
-
- -- Set the text attributes.
- labelFont := new PlatformFont name:"Palatino"
- labelFontChanges := \
- #(@font:labelFont, @size:18, @alignment:@center, \
- @leading:20, @brush:whiteBrush)
-
- xAxis := new Axis origin:135 length:450 \
- axLabel:(new GraphicLabelButton background:media["xlabel"] \
- hmarg:9 vmarg:10 fontChanges:labelFontChanges)
- labelFontChanges[@indent] := 6
- yAxis := new Axis origin:405 length:300 \
- axLabel:(new GraphicLabelButton background:media["ylabel"] \
- hmarg:10 vmarg:15 fontChanges:labelFontChanges)
- propMenu := new GrapherMenu background:media["menu"] \
- fontChanges:(#(@size:20, @alignment:@center, @leading:20, @font:labelFont))
-
- apply nextMethod self background:media["graph"] \
- xAxis:xAxis yAxis:yAxis \
- propertyMenu:propMenu propertyList:ModelCar.axisProperties \
- travelDuration:12 args
-
- placeLabels self
- self
- )
-
- method afterinit self {class AutoGrapher} #rest args ->
- (
- apply nextMethod self args
-
- -- Add the junkyard dropspace
- -- The drop space is the area on the grapher where the model cars can be
- -- dropped to be removed from the current selection list
- self.dropspace:= new Rect x1:460 y1:430 x2:640 y2:480
- self
- )
-
- "Compiled autogrph.sx"
- -->>>
-